<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	
	<h:form style="margin:0;" id="#{compId}_form">
        <p:toolbar>
            <p:toolbarGroup align="left">
            
                <p:commandButton id="#{compId}_move" type="button" title="移动屏幕" image="ui-icon-arrow-4"
                	onclick="SinoComponent.Bpm.changeOuterControlType('#{compId}','#{compId}_form:#{compId}_move','screenMove')"/>
                <p:commandButton id="#{compId}_hop" type="button" title="画线" image="ui-icon-arrowthick-1-ne"
                	onclick="SinoComponent.Bpm.changeOuterControlType('#{compId}','#{compId}_form:#{compId}_hop','inner:dealCreateHop')"/>

                <p:separator />

                <p:commandButton id="#{compId}_part" type="button" title="局部放大" image="ui-icon-search"
                	onclick="SinoComponent.Bpm.changeOuterControlType('#{compId}','#{compId}_form:#{compId}_part','partMagnify')"/>
                <p:commandButton id="#{compId}_magnify" type="button" title="放大" image="ui-icon-zoomin"
                	onclick="SinoComponent.Bpm.changeOuterControlType('#{compId}','#{compId}_form:#{compId}_magnify','magnify')"/>
                <p:commandButton id="#{compId}_lessen" type="button" title="缩小" image="ui-icon-zoomout"
                	onclick="SinoComponent.Bpm.changeOuterControlType('#{compId}','#{compId}_form:#{compId}_lessen','lessen')"/>
              
              	<p:separator />

				<p:commandButton type="button" title="删除选定元素" image="ui-icon-trash"
					onclick="SinoComponent.Bpm.deleteSelectedElFromOutset('#{compId}')"/>
                <p:commandButton title="保存" image="ui-icon-disk"
                	onstart="SinoComponent.Bpm.saveFromOutset('#{compId}')"
                	oncomplete="SinoComponent.Bpm.saveFromOutsetComplete('#{compId}')"
                	actionListener="#{bpmAction.saveJpdlDefineAction}">
                	<h:inputHidden value="#{compId}" />
                </p:commandButton>
                
            </p:toolbarGroup>
            
            <p:toolbarGroup align="right">
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="start" title="开始节点" value="/img/component/bpm/jpdl/start32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="start" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="end" title="结束节点" value="/img/component/bpm/jpdl/end32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="end" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="end-cancel" title="取消节点" value="/img/component/bpm/jpdl/end-cancel32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="end-cancel" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="end-error" title="错误节点" value="/img/component/bpm/jpdl/end-error32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="end-error" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<p:separator style="float:left;margin-top:7px;" />
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="state" title="状态节点" value="/img/component/bpm/jpdl/state32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="state" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="task" title="人工任务节点" value="/img/component/bpm/jpdl/task32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="task" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="sub-process" title="子流程活动节点" value="/img/component/bpm/jpdl/sub-process32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="sub-process" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<p:separator style="float:left;margin-top:7px;" />
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="decision" title="判断节点" value="/img/component/bpm/jpdl/decision32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="decision" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="fork" title="分支节点" value="/img/component/bpm/jpdl/fork32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="fork" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            	<h:panelGroup styleClass="sino-bpm-activity-toolbar-item-div">
            		<p:graphicImage id="join" title="聚合节点" value="/img/component/bpm/jpdl/join32.png" styleClass="sino-bpm-activity-toolbar-item" />
            		<p:draggable for="join" helper="clone" scope="jpdlActivity" stack=".sino-bpm-activity-toolbar-item"/> 
            	</h:panelGroup>
            </p:toolbarGroup>

        </p:toolbar>
        
        <h:panelGroup layout="block" id="#{compId}_flowSelectedDiv">
        <h:inputHidden id="pageCanvasString" value="#{commonContentViewBean.pageCanvasString}" />
        <p:flowChart widgetVar="#{compId}_flowModel" 
        	width="#{preferencesManager.pageWidth - 245}" height="#{preferencesManager.pageHeight - 230}" style="border:1px solid #A8A8A8;border-top:none;" styleClass="ui-corner-bottom"
        	value="#{commonContentViewBean.flowModel}" />
        </h:panelGroup>
        
        <p:droppable for="#{compId}_flowSelectedDiv" scope="jpdlActivity"
                onDropUpdate="#{compId}_flowSelectedDiv"  
                onDrop="SinoComponent.Bpm.Define.addActivity"/>
        
    </h:form>

</ui:composition>









